package download;

public class Types
{

	static public final int HTML = 0;
	static public final int PDF = 1;
	static public final int DOC = 2;
	static public final int ZIP = 3;
	static public final int RAR = 4;
	static public final String extensions =  ".jar|.rar|.tar.gz|.zip|.mp4|.avi|.flv|.mp3|.ogg|.flac|.pdf|.doc|.odt";
	
	public static int getType(String s)
	{
		if (s.equals("application/pdf"))
			return Types.PDF;
		else if (s.equals("application/zip"))
			return Types.ZIP;
		else if (s.startsWith("text/html"))
			return Types.HTML;
		else return -1;
	}
}
